Video frame grabber comprising analog video signals analysis system

ABSTRACT

In a video frame grabber for digitizing analog video signals which have a pure analog video signal component and a synchronisation signal component, the synchronisation signals are digitized along with the pure analog video signals. Video gain and offset, sync gain, and sync threshold can be adjusted electronically. A variable time delay can be imposed on the sampling clock signals and on horizontal reference signals. Optimal values can be determined for the various parameters.

FIELD OF THE INVENTION

The present invention relates to a system for the digitization of analogvideo signals, having the capability to digitize and analyze the videosynchronisation signals in order to derive the analog video signaltimings. The analog video signal can represent a black and white image,a colour image comprising three monochrome channels : one for red, greenand blue, and can be a low, medium or high line rate analog videosignal.

BACKGROUND OF THE INVENTION

A system for the digitization of analog video signals is referred to asa video frame grabber. The analog video signals carry the informationabout an image in such a way that the image can directly be visualisedon a video monitor. The digitization is necessary to obtain the image indigital format. In digital format, the image can more easily beprocessed and stored, and more accurately be transmitted and reproducedon different types of hard copy devices. A lot of systems, includingmedical systems for radiological diagnosis such as Computed Tomography(CT) and Magnetic Resonance (MR) scanners and ultra sound devices,generate an electronic image of the observed object and display theimages for human interpretation on a video monitor. Usually they have nodigital image transmission means towards a hard copy device. In thesecases it is possible to branch the analog video signals to a video framegrabber, that converts the analog video data to a digital representationof the image. The digital image signals thus obtained can be used torecord the image of the observed object on a hard copy, such as a blackand white photographic transparent film.

A video frame grabber samples the analog voltage on a bipolar device orphysical transmission medium, such as a coaxial Bayonet Neil-Concelmanconnector (BNC) cable having a characteristic impedance of 75 Ohm, or afibre optic cable, and stores digital image signals, the value of whichis for example proportional to the voltage amplitude of the signal onthe bipolar device. The analog video signals represent an image. In themost simple case, the full image is given by the analog video signalsline by line, the topmost line first. For every image line, first themost left data are given, followed by the data at the right hand side ofthe given data. The same image is transmitted continuously over and overagain, mainly to visualise it continuously on a video monitor. In orderto indicate where the data for a full image starts and where a new linefor the image starts, extra signals are transmitted together with theanalog data representing the image. These extra signals are calledsynchronisation signals, abbreviated by "sync" signals. Basically, asshown in FIG. 1, there are vertical sync signals--calledVSYNC--indicating that the first line of the image will follow, andhorizontal sync signals--called HSYNC--indicating that the video data ofa next line will follow. It is possible that the VSYNC signals aretransmitted over a different physical transmission medium, called theVertical Drive. Usually, this is a binary signal, that has constantly ahigh voltage level, a falling edge coincident with the moment of thevertical sync and a rising edge shortly after the falling edge. The timebetween two falling edges of the vertical sync signal is called theframe period. The time between the falling edge of the vertical syncsignal and the rising edge occurring after the falling edge is calledthe vertical sync tip width.

In the case of a separate VSYNC, also the HSYNC signals are transmittedover yet another physical transmission medium, called the HorizontalDrive. The HSYNC is a binary signal too, having a falling edgecoincident with the moment of horizontal sync and a rising edge shortlyafter the falling edge. The time between two falling edges of thehorizontal sync signal is called the line period. The time between thefalling edge of the horizontal sync signal and the rising edge occurringafter the falling edge is called the horizontal sync tip width. Theanalog video signals--representing the image--are then carried on athird physical transmission medium, that can be digitized in order togenerate the digital image signals. Both sync signals are used tosynchronise the sampling operation of the analog video signals.

The HSYNC and VSYNC signals can also be combined on one physicaltransmission medium, and are then called CSYNC (composite sync) signals.The difference between a HSYNC and a VSYNC signal on a CSYNC signal isindicated by the width difference between the vertical and horizontalsync tip width. In industrial video formats, the vertical sync tip widthcan be as large as three line periods. Usually, the vertical sync tipwidth has a minimum duration of a half line period, because serratingpulses at half the line period are introduced, while the horizontal synctip width has a duration that is only a small fraction of the lineperiod. A video frame grabber must be capable to differentiate HSYNCsignals from VSYNC signals. The frame grabber must therefore haveinformation about the duration of the different sync tips. In the caseof a separate CSYNC and pure analog video signals, two physicaltransmission media are necessary to fully define the video image.

The CSYNC signals can also be combined with the pure analog videosignals. In that case, only one physical transmission medium carries allthe necessary video information, which is called "composite video". Theavailable voltage range is therefore separated into two sub-ranges. Afirst sub-range--usually lower voltages from 0 mV to 300 mV--is reservedfor the sync signals. The other sub-range--usually higher voltages from300 mV to 1000 mV--is reserved for the pure analog video signals. If acomposite video signal is offered, it is important that the video framegrabber can separate the CSYNC signal from the video signal, such that afalling edge in the video data would not be taken for a horizontal orvertical sync signal. Therefore, the video frame grabber must have someknowledge about the voltage sub-ranges mentioned above.

Most analog video signals in medical applications are derived from adigital image in a frame store memory that must be continuouslydisplayed on a video monitor for visual interpretation. A frame storegenerates analog signals at a rate derived from a fixed base clockwithin the frame store. This base clock is called the pixel clock of thesystem. Within a line of the analog video image, at every period of thepixel clock, the next pixel in the corresponding line in the digitalimage is converted by a digital to analog converter from a digitalsignal of e.g. 8 bits to an analog signal, e.g. an analog voltage.Depending on the bandwidth of the overall system, the analog signalreaches its target value in a fraction of the pixel clock period afterthe new pixel value was offered to the analog to digital convertor. Forsome analog video signals, e.g. those representing a full range on/offpattern for consecutive pixels, the actual minimum and maximum targetvalues cannot be reached due to bandwidth restrictions, whereas for apattern of two pixels on followed by two pixels off, the target valuescan be reached.

Usually, the frame store derives from the same base clock thesynchronisation signals HSYNC and VSYNC. Therefore, the line period isin most cases an integer multiple of the pixel clock period, and theframe period an integer multiple of the line period, although systemsexist that produce analog video signals in which the line period is notsuch a multiple of the pixel period.

As discussed above, the video frame grabber must have knowledge aboutthe sync tip widths, voltage sub-ranges for CSYNC and pure analog videosignals, etc. For one specific video standard, e.g. CCIR 625, all theseparameters are well defined and can be fixed in a video frame grabber.Such type of a video frame grabber would be capable to digitize analogvideo signals only according to this standard. In medical applications,mainly depending on the characteristics of the images, the analog videosignals and the sync signals have specific settings for the abovementioned parameters. Therefore, these parameters must be adjusted,installed or made known to the video frame grabber. Some of theseparameters are known by the manufacturer of the frame store, some arereally installation dependent. Moreover, it is rather inconvenient togather the information about the frame stores from differentmanufacturers and offer this information to the technicians installingthe video frame grabber. Usually, the determination of the video timingsis done manually, with the aid of a general purpose oscilloscope,capable of triggering on common video signals. This is a very tediouswork, requires a serious amount of skill of the operator and requiresfor some video signals a bandwidth of 400 MHz for the oscilloscope. Inorder to find the most optimal setting for some parameters, it was oftennecessary to reproduce a digitized image on a high quality hard copy,such as a transparent photographic film. Several tries were necessary tofind the optimal setting. If the number of tries was reduced, asub-optimal setting for the parameter could result. This makes it insome circumstances very difficult or too costly to arrive at the correctsettings, resulting in a poor quality of the digitized images. If theseimages are reproduced on a very sensitive hard copy, such as black andwhite transparent photographic film, the wrong parameter settings resultin clearly apparent artifacts that can degrade the diagnostic quality ofthe image.

OBJECTS OF THE INVENTION

It is therefore a first object of the invention to provide a systemcapable to determine the video timings for a wide scale of analog videoformats.

It is a second object of the invention to provide a system fordigitizing analog video signals, capable of measuring the parametersnecessary for the digitizing process.

Other objects will become apparent from the description hereinafter.

SUMMARY OF THE INVENTION

In accordance with the present invention, a video frame grabber systemis described, for obtaining digital image signals from analog videosignals, composed of pure analog video signals and synchronisationsignals, comprising:

an analog video digitizer means for digitizing said pure analog videosignals into digital image signals; and

a sync signals digitizer means for digitizing said synchronisationsignals into digital synchronisation signals.

DETAILED DESCRIPTION OF THE INVENTION

The invention is described hereinafter by way of example with referenceto the accompanying figures wherein:

FIG. 1 shows the wave forms of composite analog video signals andtimings in the HSYNC, VSYNC and CSYNC signals;

FIG. 2 shows a block diagram for the video frame grabber systemaccording to the current invention;

FIG. 3 shows a detail of the sampling clock generator;

FIG. 4 shows the analog composite video signals at different gainsettings;

FIG. 5 shows the influence of the synchronisation delay on the numberingof the samples.

In FIG. 2 a block diagram for the video frame grabber system accordingto the current invention is shown. The two most important buildingblocks are the analog video digitizer 33 and the sync signals digitizer43. The analog video digitizer 33 receives analog video signals thatmust be sampled and digitized to deliver digital image signals. Theanalog video signals that are offered to the video frame grabber systemundergo preferentially some transformations, suggested by the blocks intop half of FIG. 2. First of all, the analog video signals must bereduced to a workable area of the analog video digitizer 33. Thedigitizer expects a low voltage of -2V and a high voltage of 0V. If thevoltage range of the pure analog video signals is not 2 Volt, the videogain circuit 30 can be adjusted to bring the pure analog video signalswithin that range. Preferentially, the video gain circuit 30 can amplifyor reduce the amplitude of the analog video signals. The video gainfactor must thus be variable. In a preferred embodiment, the video gainfactor can be set electronically by an eight bit register, capable tostore values from 0 to 255, and coupled to a digital to analog converterto deliver a voltage that varies linearly with the digital value. Atvalue 0, a multiplier (not shown) within the video gain circuit 30 issupplied with a voltage of 0.3V, and at 255, it is supplied with 1.3V.The analog video signals, re-sized by the video gain circuit 30 are thensent to an analog filter circuit 31. Dependent on the useful bandwidthof the analog video signals, a specific analog low pass filter can beselected to filter the re-sized analog video signals. In a preferredembodiment, the filter selection can be short circuited, giving nofiltering effect, a low pass filter with cut-off frequency of 80 MHz, 40MHz or 12 MHz can be selected. The useful bandwidth of a video signalcan preferentially be deduced from the estimated pixel clock frequencyby which the analog video signals were generated. The advantage offiltering analog video signals lies in the fact that high frequencynoise added to the system can be reduced considerably. The filteredanalog video signals are then sent to a unit that clamps to the lowestanalog video levels. This is sketched by the back porch clamping circuit32. This circuit gets the filtered analog video signals and a signalderived from the synchronisation signals. The last signal is useful toindicate at what moment the back porch of the video signal can besampled. The level of the back porch is the absolute level towards whichother analog video levels must be referenced. Within the back porchclamping circuit, two registers (not shown) are installed, the first oneindicating the delay, with respect to the HSYNC signal, that must beintroduced before sampling the back porch and the second one indicatingthe time interval at which the sampling must occur. As known in the art,some video formats have a set-up level above the blanking level, thatrepresents absolute black. In order to reference all active videosignals with respect to the set-up level, a video offset factor can beinstalled in the back porch clamping circuit 32. Preferentially, adigital register of eight bits contains a value from 0 to 255. A digitalto analog converter, coupled to said register, converts the digitalvalue to a set-up level, that is applied to the filtered analog videosignals. The back porch clamping circuit 32 outputs pure analog videosignals, that can be digitized by the analog video digitizer 33.Preferentially, this is an eight bit analog to digital converter, with amaximum sampling frequency of 120 MHz. The sampling frequency of theanalog video digitizer circuit 33 is imposed by a sampling clockgenerator 42, generating a rising clock signal at each moment an analogvideo signal must be digitized. The output of the analog video digitizercircuit are preferentially eight bit digital image signals, that can bestored in a digital memory unit 35 for further processing. The digitalmemory unit 35 can be random access memory (RAM), hard disk, magnetictape, etc. The digital image signals stored within the digital memory 35can be sent to a hard copy device, such as the Agfa LR 3000 laserrecorder system, marketed by Agfa-Gevaert N.V. in Mortsel, Belgium, toreproduce the image, represented by the analog video signals, on a hardcopy such as a photographic film.

The synchronisation signals follow a different path. They can be derivedfrom the analog video signals, in which case these signals are compositevideo signals, such as for traditional black and white monitors. Thesesignals can be obtained after video gain re-sizing in the video gaincircuit 30. In that case, the video gain circuit can also be used as async gain circuit. In the case of three separate analog video signalsfor RGB colour images, the sync signals can be on the green channel,while the red channel must be digitized. In that case, the green analogvideo signals may need another gain factor than the red channel, whichis done in the external sync gain circuit 36. Also vertical drivesignals or separate HSYNC and VSYNC signals can be selected in the syncselection and separation circuit 37, to generate a uniform CSYNC. Theanalog CSYNC signals can preferentially be filtered by a low pass filter50 different from the analog low pass filters 31, to eliminate highfrequency noise. The analog CSYNC signal is supplied to a comparatorcircuit 38, to convert the analog CSYNC signal to a binary digitalsignal having value 0 or 1. Low analog CSYNC levels are transformed to alevel 0, while high analog CSYNC levels are transformed to a level 1.The discrimination of which analog CSYNC level is low or high, is madeby a sync threshold setting within the comparator circuit.Preferentially, the sync threshold value can be set by an eight bitregister, containing values from 0 to 255. This register is coupled to adigital to analog converter, that converts the digital value to athreshold level, against which the analog CSYNC values are compared. Thedigital signals from the comparator circuit 38 can be fed into a syncsignals digitizer 43. This digitizer is driven by a sampling clockgenerator 42 and stores at every rising edge of the sampling clocksignal the digital value from the comparator circuit 38 in the digitalmemory 35. In order to instruct the digital memory 35 which digitalvalues must be stored, a video or sync digitize selection circuit 34 isinstalled between the analog video digitizer circuit and the syncsignals digitizer.

Alternatively, the analog CSYNC signals can also be sent directly to theanalog video digitizer circuit 33, where a selector selects whether thepure analog video signals or the analog CSYNC signals must be digitized.

The sync threshold for the comparator circuit 38 and the sync gainfactor for the external sync gain circuit 36 can be set, as will bediscussed below, such that the threshold is situated in the middle of arising or falling edge of the analog CSYNC signals. The free choice ofthe sync gain factor and sync threshold has the advantage that analogsynchronisation levels can be sampled such that the synchronisationtimings are most accurately known. This has an advantage for thesampling of the sync signals in the sync signals digitizer and for thesampling clock generator 42 for the analog video digitizer 33, thatderives its base clock from HSYNC signals obtained from the digitalCSYNC signals. The digitized CSYNC signals are also fed to a digitalsync analyzer circuit 39, that mainly generates HSYNC signals,indicating the falling edge of the HSYNC signals. These HSYNC signalscan be selected by the base clock selection circuit 40 to serve as baseclock signals for the sampling clock generator circuit 42. The baseclock selection circuit 40 can also select a fixed system base clock 41,in the current embodiment having a fixed frequency of about 60 kHz. Thisfixed base clock 41 is mainly used for serving as base clock when syncsignals must be digitized. The base clock signals can then be delayed bya programmable delay circuit 27, in order to simple the analog videosignals at the optimal time, as will be described below. In order tosave memory space and transmission time for the digital image signals,an active window delineation circuit 44 is installed, that inhibits thesampling clock signals from the sampling clock generator 42 towards theanalog video digitizer 33, as long as the analog video signals areoutside the active window. This is especially true for the period whereHSYNC and VSYNC signals occur in the analog video signals. The activewindow delineation circuit 44 must reset a pixel counter each time afalling edge in the HSYNC signals occurs. Because the moment of thefalling edge and the moment of the rising edge of a sampling clocksignal can coincide or occur critically close to each other, a HREF(horizontal reference) delay can be introduced to the HSYNC signal bythe HKEF adjust circuit 45. Preferentially, the HREF adjust circuit candelay the HSYNC signal with variable delay times, ranging from 7 to 14nanoseconds in increments of 1 nanosecond. In the following paragraphswe will discuss how the various settings can be optimally chosen basedon several video timings, to give high quality digital image signals.

For the determination of several video timings, it is advantageous todigitize and analyze the sync signals. As described above, the syncsignals can be given as VSYNC and HSYNC separately, as a composite CSYNCcombining VSYNC and HSYNC, or together with the analog video data in acomposite video signal. In a preferred embodiment, separate VSYNC andHSYNC are combined to a CSYNC, a given CSYNC is left unchanged and in acomposite video signal the sync signals are isolated or stripped off bya sync separator circuit 37. The input of the sync separator circuit isthe composite video signal, the output is a CSYNC signal.

Thus, preferentially the three possible situations are reduced in thesync selector and sync separator circuit 37 to a situation wherein aCSYNC signal becomes available.

The system comprises a sampling clock generator 42, that ispreferentially realised as shown in FIG. 3. A sampling clock generatoris a system that receives a low frequency base clock signal havingfrequency f_(B) and that delivers a high frequency sampling clock signalhaving frequency f_(s). The sampling clock frequency f_(s) is an integermultiple of the base clock frequency f_(b) : f_(s) =N* f_(b). In thesystem of the current invention, the base clock signal can be generatedby a fixed base clock 41 or by the falling edges of the HSYNC signals.The sampling clock generator 42 can preferentially be realised as aPhase Locked Loop system as shown in FIG. 3, comprising a VoltageControlled Oscillator VCO 21, an optional frequency pre-scaler circuit22, a sample counter circuit 23 and a phase difference and frequencydetector 24. The operation of the sampling clock generator circuit 42 isas follows. As will be described below, the phase difference andfrequency detector 24 generates a voltage ΔV. This voltage is applied tothe VCO 21. According to the voltage applied to the VCO 21, the VCOgenerates an oscillating signal at its output, the frequency of which isproportional to the applied voltage ΔV. This frequency is typicallybetween 60 and 120 MHz. The oscillating output signal from the VCO 21 isapplied to the optional frequency pre-scaler circuit 22. This circuitreceives oscillating signals at a certain input frequency and transmitsoutput oscillating signals at the same input frequency, or the inputfrequency divided by a factor of 2, 4 or 8. The sampling clock signalsthus have a frequency f_(s) that ranges between 60/8=7.5 MHz and 120MHz. The optional frequency pre-scaler circuit 22 thus broadens therange for the VCO circuit to lower frequencies. The division factor canpreferentially be changed easily between the possible values 1, 2, 4 or8. In a preferred embodiment, the division factor for the frequency canbe set electronically, preferentially under control of a microprocessormeans. The sampling clock signals fs are now fed back in the circuit viaa sample counter circuit 23. This circuit counts the number ofoscillating pulses or the number of rising edges applied to its input,and generates at its output one rising edge as soon as a predeterminednumber N is reached, and then resets the counter to zero. The outputsignal is dropped shortly after the rising edge. The output signals Afrom the sample counter 23 are very similar to the base clock signals Bat the input of the sample clock generator 42, and occur at a frequencyof exactly f_(A) =f_(s) /N. The counter value N will be indicative forthe number of sample periods within one line period. Preferentially,this value can freely be set under control of a microprocessor means.The phase difference and frequency detector 24 receives both the dividedsampling clock signals A and the base clock signals B, and will modifyits output voltage ΔV if the rising edge of the divided sampling clocksignal A does not coincide with the rising edge of the base clock signalB. The voltage ΔV will modify the output frequency of the VCO in thatsense that the time difference between the two rising edges decreases.Once the two rising edges coincide, the frequency output of the VCO 21is not changed, and f_(A) =f_(B) accordingly. Because f_(A) =f_(s) /N,then f_(s) =N*f_(B).

In the system according to the current invention the base clock signalscan be generated by the HSYNC signals or by a fixed base clock. Thelatter is preferentially used when no video timings are known.Initially, the sync signals are sampled at a predetermined samplingclock rate and digitized to a single bit digital or binary value persample. As described above, the sync signals have a high voltage leveland a low level. The characteristics of the electronic circuit are forexample such that the binary value is 1 for a high signal level and 0for a low signal level. A transition from 1 to 0 in the digitized binarysignals then indicates a falling edge of the sync signal. In theelectronic circuit, a means for adjusting the sync gain of the syncsignal and a means for adjusting the sync threshold level are included.The sync gain is incorporated in FIG. 2 in two locations. If the CSYNCsignals are derived by the sync selection and separation circuit 37 fromthe analog video signals, then the sync gain is realised by the videogain circuit 30. Installation of a good gain factor for the analog videosignals will result in a good gain factor for the composite sync levels.If the CSYNC levels are derived by the sync selection and separationcircuit 37 from an external source, such as can be the case in asituation where in a colour RGB signal, the red signal must be digitizedand the composite video signals are present only on the green analogvideo signals. In that case it may be necessary to install a specificgain factor on the external composite video signals from the greensignal, by the external sync gain circuit 36. The means for adjustingthe gain brings the levels of different types of sync signals into astandard range from 0 mV to 600 mV. As described before, the syncsignals accompanying the analog video signals can be retrieved from acomposite video signal, from a separate composite sync signal CSYNC orfrom a horizontal drive signal HSYNC. In a composite sync signal, thelow sync level is usually 0 V, the high sync level is typically 300 mV.In that case, the sync signal must not be attenuated and a maximum gainvalue is installed. The means for adjusting the gain comprises an 8 bitregister. This way, values from 0 to 255 can be put into this register.A value 255 means that the sync signal is not attenuated. A voltage of1.3 V is supplied to a multiplier circuit (not shown) within the videogain circuit 30. For a digital value of 0, a voltage of 0.3 V issupplied to the multiplier circuit. Any other value N, means that thesync signal is attenuated. A separate CSYNC sync signal or a horizontaldrive signal is usually a transistor-to-transistor logic (TTL) signal.This ranges from 0 V to 5 V. In order to reduce this range from 0 V to600 mV, a value N=30 can be installed in the external sync gain circuit36. It is also possible that no external sync signal is used for thedigitization of the image. In that case, the gain value can be set tozero. The zero setting reduces the noise that can be introduced on thesystem by the sync signals.

Once the gain value N is set, the threshold value within the comparatorcircuit 38 for the sync levels can be determined. The threshold valuecorresponds with a certain voltage level. Sampled gain corrected syncsignals above this threshold voltage will be digitized to a value 1,while sync signals below this level will be digitized to a value 0.Preferentially, the threshold level voltage can be varied between 0 mVand 400 mV. The exact setting can be done by another register of 8 bits,allowing values from 0 to 255 to be installed. A value of 0 correspondswith a threshold level of 0 mV, while a value of 255 corresponds with athreshold level of 400 mV. Usually, the value 96 is installed,corresponding with a 150 mV threshold voltage level. This value rendersthe system practically immune to noise on mainly the upper and lowerportions of the sync edges. For a sync pulse of 300 mV high, thethreshold voltage level of 150 mV is half way this height.

Preferentially, the following automated procedure is followed todetermine the sync threshold level in the comparator circuit 38 and thesync gain factor in the video gain circuit 30 or the external sync gaincircuit 36. A fixed threshold level is installed, preferentiallycorresponding to the value 96. This threshold level is kept constant forthe whole procedure. The gain factor is varied from the largest factorto a smaller factor until the gain factor is found that makes thethreshold level to coincide with the blanking level. The procedure isstarted with a maximum gain factor, e.g. corresponding with a gainnumber 255. This large gain factor gain1, as shown in FIG. 4, will keepthe lowest voltage of the sync tips at about 0 Volt, surely below thefixed threshold level, while the blanking level, set-up level and activevideo levels will be well above the fixed threshold level. The syncsignals are sampled with a sampling clock derived from a fixed baseclock. The fixed base clock in the current embodiment has a frequency ofabout 60 kHz. Preferentially, the fixed base clock, the frequencypre-scaler value (1, 2, 4 or 8) and the sample counter value within thesampling clock generator 42 are selected such that the sampling clockgenerates about one million samples for one frame period. A frame periodis typically 1"/25 or 40 ms. One sample per 40 nanoseconds can beacquired, with a sampling clock of 25 MHz. All gain corrected analogsync signals below the threshold level will be digitized giving adigital value 0, and all signals above the threshold will result in avalue 1. With the high sync gain setting gain1 in FIG. 4, only the synctips will result in 0, while all other levels will result in 1, as shownby the shaded area. With this maximum gain setting gain1, a firstpercentage P₁ of samples having value 1 is recorded. In FIG. 4 thispercentage is for example 91.6%. This percentage P₁ is kept for absolutereference with respect to other percentages. The gain setting isdecreased to gain2, as shown in the next diagram of FIG. 4, the syncsignals are digitized again and a second percentage P₂ of samples havingvalue 1 is recorded. As the gain decreases to gain2, the blanking levelof the sync signals will decrease and approach the threshold level. Ifthe blanking level is still higher than the threshold level for a gainsetting gain2, the second percentage P₂ may be lower e.g. 91.3%, due tosloping sync edges, but will not be very different from the firstpercentage P₁. In that case, the gain setting is further decreased to again factor gain3, and after digitizing the sync signals, a thirdpercentage P₁ is computed. If the blanking level is below the threshold,then not only the sync tips will result in zero digital values, but alsothe analog video signals where the level is at the blanking level, suchas the front porch and the back porch of the horizontal sync signals.Both front and back porches are usually quite large, and occupy togetherabout 4% of the total line period. In that case, the percentage P_(s) ofdigital values 1 will be considerably lower than P₁. In the thirddiagram of FIG. 4, this percentage is 50%. If that percentage P₃ is 4%lower than P₁, then we assume that the gain corrected blanking level isbelow the threshold level. By binary searching, illustrated by thediagrams according to gain4 and gain5, we find the gain level G_(c) atwhich the percentage P_(c) first considerably changes. This gain settingis then multiplied by a factor of 1.67, giving "sync gain" in FIG. 4, inorder to situate the threshold level somewhere between the gaincorrected sync tip level and blanking level.

Once a workable sync gain and sync threshold value are installed, thedigitized sync signals can be used to find the line period and the frameperiod. For this purpose, the falling edges or transitions from 1 to 0in the digitized sync samples are located, and the distance between eachtwo consecutive transitions is recorded in distance classes. Thedistance is the number of samples between two transitions. A distanceclass gathers all distances between two limits. The most crowded classis that with distances caused by horizontal sync signals. The meandistance within this class, together with the sample period of thesampling clock signals, gives a good approximation of the line period,or reciprocally the line rate of the video signal. The start of thehorizontal syncs is located at the 1 to 0 transition that has a distanceto the previous and next transition belonging to this class. This way,all horizontal sync signals can be located. The vertical sync signalshave a vertical sync tip that is considerably larger than the horizontalsync tip. The width of a horizontal sync tip can be found by searchingfor the first 0 to 1 transition. The total width of a vertical sync tipis at least the distance from the vertical sync to the next 0 to 1transition. It is possible that within the low level vertical sync tip,narrow high level serration pulses are introduced, for stabilisationpurposes of the video monitor. These occur a half or one full lineperiod of time after the vertical sync. If two or more frames aredigitized, two vertical sync signals can be located, and the frameperiod can be derived accordingly. The frame period divided by the lineperiod gives the number of lines per frame in the video format. For anindustrial video format derived from a 625/50 Hz CCIR standard format,the system of the current invention finds an approximate line time of64.2 microseconds, giving a line rate of 15 kHz. The HSYNC tip ismeasured to have a width of 4.8 microseconds. By the absence ofserration pulses during the vertical sync, the system derives that thevideo format is of an industrial type, whereas standard CCIR format doeshave serration pulses at twice the line frequency during the verticalsync period. According to the presence or absence of serration pulses, acircuit (not shown) is set within the sampling clock generator 42, inorder to further enable respectively disable the frequency correctioncircuit within the sampling clock generator circuit. If the serrationpulses are not present, the sampling clock generator 42 is set in "halt"mode, i.e. the voltage controlled oscillator is not corrected forfrequency deviations from the moment that the vertical sync period isdetected until the end of this period. The number of lines computed fromthe line period and the frame period gives 624 lines, with an accuracybetter than 0.1%. Further analysis reveals that the video format isnon-interlaced and has two frames with 312 lines per frame. The bestestimation for the line time is 64.135 microseconds, and correspondinglya line rate of 15.592 kHz. The frame time observed is 20.010milliseconds. The system can further derive from the digitized syncsignals that the video format has a VSYNC tip width of 192.4microseconds, corresponding to three lines.

The number of lines per frame gives an indication about the videoformat. The higher the number of lines per frame, the higher the pixelclock at which the video data has been generated. The number of linescan be arranged in consecutive disjunct sets. With every set, afrequency interval f_(LOW), f_(HIGH) ! can be associated. We assume thata video format with a specific number of lines per frame can have apixel frequency only within the associated frequency interval. Thefrequency intervals for different sets can have overlapping frequencies.The sets and frequency intervals can be stored in an internal table andthe frequency interval can be retrieved as soon as the number of linesper frame is known. In the above example, we found that the number oflines was 624. Accordingly, the number sampling clock signals to begenerated per horizontal line period is estimated to be in the interval481,1100!. Together with the line rate found of 15 kHz, this results inpossible sampling frequencies in the interval 7.2 Mhz, 16.5 MHz!.

The knowledge of the horizontal sync tip width and the line period,allows us to set in the sync analyzer circuit 39 the conditions when async tip must be considered as a horizontal sync and when as a verticalsync. For the above described example, the VSYNC detect setting can beinstalled as 11.6 microseconds. This means that the sync analyzercircuit 39 will consider the sync tip as a vertical sync rather than ahorizontal sync if the sync tip has a width larger than 11.6microseconds, which is nearly 2.5 times larger than the estimatedhorizontal sync tip width. Another parameter that can be installed inthe sync analyzer circuit 39 is the half line lockout period. Most videoformats have before and after the vertical sync a number ofpre-equalizing and post-equalizing sync signals right in the middlebetween two horizontal sync signals. To avoid that these signals areconsidered as horizontal sync signals and disturb the behaviour of thesampling clock generator, the detection of sync signals can be disabledfor a certain portion of the line period, which is called the half linelockout period. In our example, the line period was estimated to be 64.2microseconds. The half line lockout period is set to 50.4 microsecondsaccordingly.

After setting the above mentioned video timing parameters, an image canbe captured and digitized in a synchronised way, albeit the correctpixel clock is not known. The purpose of the video gain and video offsetcircuits is to use the analog digital convertor (ADC) in the analogvideo digitizer circuit 33 at its full range. If the minimum specifiedvoltage V_(MIN) is applied to the ADC, then it will output digital value0. If the maximum specified voltage V_(MAX) is applied to the ADC, itwill output digital value 255 for an 8-bit ADC. The voltage U of theanalog video signals range however from U_(MIN) to U_(MAX), that can bedifferent from the above specified voltages for the ADC. The intervalU_(MIN),U_(MAX) ! must be mapped linearly to the interval V_(MIN),V_(MAX) !. The video gain is preferentially incorporated directly at theinput of the frame grabber system, whereas the video offset isincorporated preferentially in the back porch clamping circuit. TheHSYNC signals obtained in the sync analyzer circuit 39 by analysing theSYNC signals, together with programmable delays, indicate where the backporch starts. The blanking level is sampled over a programmableaveraging period and stored by the back porch clamping circuit doing DCrestoration. All analog video signals will be referenced with respect tothis level. If the video format has a set-up level of 0 V above theblanking level, then a zero video offset can be set in the back porchcircuit 32. If however the video format has a set-up level higher than 0V, a zero video offset setting will result in the use of only a partialrange of the ADC. In the current embodiment, the lowest video signalswill be digitized to digital values higher than zero. If thedigitization of analog video signals representing an image using thefull dynamic range of the video source results in a digital image havinga minimum higher than zero, this is an indication that the video formathas a substantial set-up level, which must be corrected by the videooffset factor.

To find optimal settings for the video gain factor and video offset, itis necessary that the analog video signals, transmitted to the videoframe grabber, cover the full range of video levels. This can beachieved for example by displaying a black image with white text orgraphics or vice versa, or by displaying a test image like a Society ofMotion Picture and Television Engineers, Inc. (SMPTE) test image thatcontains the highest and lowest video levels.

In an iterative process, the active window of the video format isdetermined, together with the optimal settings for the video gain in thevideo gain circuit 30 and video offset in the back porch clamping unit32. The active window is defined by those video lines and those pixelswithin the video lines that actually carry relevant image information.Usually, the analog video signals of the lines not belonging to theactive window are set to display black, which corresponds to a levelequal to the set-up level of the video format. Also the video signals ineach line, preceding and following the active video signals, will have alevel close to the set-up level. Therefore, all data outside the activewindow will be displayed black on a video monitor. Moreover, in order tofind the active window, analog video signals must be generated thatcorrespond with an image filling the active window. The topmost andbottommost lines of the image must contain at least some grey or whitepixels. Also the most left and most right pixel of at least one linewithin the active lines must be grey or white. The image must containcompletely dark areas and completely white areas, in order to find thecorrect video gain and video offset settings.

First the image is captured with the largest possible settings of numberof active video lines and number of active video pixels. These settingsare installed in the active window delineation circuit 44. A videooffset of 0 is installed in the back porch clamping circuit 32 and avideo gain of 0 is installed in the video gain circuit 30, correspondingto a voltage of 0.3 V supplied to the multiplier circuit. The image isdigitized into digital values and the maximum value for the digitalvalues is searched. In the above mentioned example, we found for thesesettings a maximum digital value of 104. A new video gain setting iscomputed, such that the maximum digital value will be close to 220. Wefind a video gain setting of 81, by taking into account that a settingof 255 will supply a voltage of 1.3 V to the multiplier circuit withinthe video gain circuit 30, while the video offset is still at 0. Thesame analog video signals are digitized with these new settings, and themaximum digital value detected is now 219. For a first iteration on thevideo gain and offset, these values are satisfactory. A first iterationto find the active video window is then started. Within the digitalimage signals, the digital values of the first video lines are examined.If the first line of the digital image does not contain at least threepixels having digital value 73, being one third of the maximum value(219) within the image, then this line is omitted from the activewindow. The same method is applied to the following digital lines, untila line is found with at least three digital values larger than 73. Wefind that the 32 top lines do not belong to the active video window. Thesame method is applied, starting from the bottom lines. For the currentexample, 28 bottom lines are found to be outside the active window. Aframe of 312 lines results in this case in 252 active lines. Within eachof the remaining active lines, the first pixel number is found that hasa value larger than 73. The minimum value of these numbers over allactive video lines is taken to be the first active pixel in each line.The above example results in 232 start pixels not belonging to theactive window. The same method is applied to the trailing pixels of eachvideo line, and 84 pixels are found to be outside the active window. Thevalues found, delineating the active window, are installed in the activewindow delineation circuit 44 and the same analog video signals arecaptured within the active video window at the highest frequency levelf_(HIGH) from the above determined frequency interval, with the videogain factor gain1 and video offset offset1 found in the first iteration.The digitized data are analyzed to find the minimum digitized valueD_(MIN) and the maximum digitized value D_(MAX). Based upon the settingsof gain₁ and offset₁, and the values D_(MIN) and D_(MAX), new settingsfor gain₂ and offset₂ are computed and installed in the video framegrabber, such that at a new capture of the image D_(MAX) will be closerto but still higher than the lowest possible output value of the ADC andD_(MAX) will be closer to but still lower than the highest possibleoutput value of the ADC. This process can be iterated until a video gainand video offset are installed such that D_(MIN) and D_(MAX) exactlycoincide with the minimum and maximum possible output levels of the ADC.In the above example, with a video offset value 0 and a video gainfactor of 107, the maximum digital value level is 253, and the minimumlevel is 0. These video gain and video offset settings are appropriatefor the next steps in the procedure to establish the video parameters.

The next steps are intended to determine the pixel frequency at whichthe analog video signals were generated. By selecting the HSYNC signalsin the base clock selection circuit 40 as base clock signals, thesampling clock generator 42 generates sampling clock signals having aperiod being a multiple of the line frequency. As discussed above, thisis obtained by installing an integer value N in the sample countercircuit. If the line period of the analog video signals is exactly aninteger multiple M of the pixel clock period imposed by the frame store,generating the analog video signals, and the installed counter value Nequals to M, then the sampling clock period of the video frame grabberis made equal to the pixel clock period of the frame store and theanalog video signal can be sampled correctly. If the integer value Ninstalled in the counter circuit within the sampling clock generator isone short N=M-1, some of the analog signals within one image line willbe digitized during their rise time, before they are stabilised, whileother signals are sampled at the correct moment and other signals aresampled in the falling edge. This will introduce artifacts, commonlyreferred to as moire. These artifacts will occur more frequently withinone image line if the integer value N differs with two units from thecorrect value M. To avoid these artifacts it is of utmost importance todetermine exactly this integer value, which is referred to as the numberof pixels per line.

Therefore, an image must be transmitted, having a substantial amount offast transients within one line or within consecutive lines. Fasttransients in the video signal are present in text lines, specific partsof test images and graphics within the image. The lines having fasttransients or large ramps can be located automatically by sampling theanalog video signals of the complete image or a portion of theimage--preferentially within the active video window--at a relativelyhigh frequency, preferentially f_(HIGH), and counting per video line theamount of digitized pixel clusters consisting of four consecutive pixelsthat have a difference, between the minimum and maximum digital valuewithin the cluster, above a certain threshold. The lines having thelargest amount of such pixel clusters are selected as representative forhaving the most transients. For the analog video signals of the currentexample, lines 5, 8, 248, 249 and 250 are found to contain the mosttransients.

The sampling is performed in synchronisation with the video signal.Therefore, in FIG. 2, the HSYNC signal is selected as the base clocksignal for the sampling clock generator 42. The actual sampling clockfrequency fs is determined by the settings of the frequency pre-scalercircuit 22 and the sample counter circuit 23 in FIG. 3. The video framegrabber further comprises a programable delay circuit 27 that delays thebase clock signal over a few nanoseconds. The purpose of this delaycircuit 27 is to match the phase of the internally generated samplingclock signals with the phase of the incoming analog video signals, oncethe optimal sampling clock has been established. Preferentially, thebase clock signal can be delayed with several delay times, ranging from0 nanosecond to 128 nanoseconds with increments of 0.5 nanoseconds. Theprogramable delay circuit 27 allows also to virtually increase thesampling clock frequency, even if this does not match the pixel clockfrequency. If for example the sampling clock generator 42 generates asampling clock at 50 MHz, then every 20 nanoseconds a sample from thepure analog video signals is digitized in a first set of digital imagesignals. If the programmable delay circuit is set to delay the baseclock signals over 10 nanoseconds, the sampling clock signals will alsobe delayed by 10 nanoseconds and the same analog video signals aredigitized in a second set of digital image signals, then the first andsecond set of digital image signals can be combined to a set giving asample every 10 nanoseconds, thus representing digital image signalsvirtually sampled at 100 MHz. By setting the time delay to 5 and 15nanoseconds for obtaining a third and fourth set of digital imagesignals, the digital image signals of these last two sets can becombined with the first two sets to represent signals virtually sampledat 200 MHz. Preferentially, the number of phase shifts is selected suchthat the virtual frequency is about twenty times higher than the actualsampling clock frequency f_(HIGH). Although the phase shift can beinstalled with an accuracy of 0.5 nanoseconds, the actual time offsetbetween samples of different sets is not exactly the phase shiftdifference as installed. This is due to the exact time when thehorizontal sync crosses a certain threshold level and due to slightfrequency variations of the sampling clock generator. To reduce theserandom variations, the selected video lines are digitized several timeswith the same phase shift setting. The digital values obtained in eachset are averaged over the set. In the current example, the video imageis sampled by installing in the sampling clock generator a value of1082. Because the line rate is 15.592 kHz, this corresponds with asampling frequency of 16.87 MHz, or a pixel period of 59.27 nanoseconds.

In the combined set of digital image signals, the fast transients arelocated by searching the locations of steepest gradient. The location ofa specific intermediate digital value, e.g. 128, in each rising edge isestimated. Preferentially, the minimum D_(MIN) and maximum D_(MAX)digital pixel values within the image line are found, and theintermediate digital value is chosen to be the mean value of D_(MIN) andD_(MAX). The distance in pixels between rising edges can be reduced to atime interval, by the knowledge of the sampling clock frequency and theseveral phase shifts introduced. Alternatively, the time intervalsbetween falling edges of the transients are established. Each timeinterval found must be an integer multiple of the pixel period, beingthe reciprocal of the pixel frequency f_(p). From these multiples, alist of candidate frequencies f_(i) for the exact pixel frequency f_(p)can be derived. This list will typically include f_(i) =f_(P), f_(p) *2,and sometimes--mainly depending on the graphical patterns within theline--f_(p) /2, 3*f_(p) /2 etc, with small variations on the exactvalue. For the current example, we found 67 rising transient edges and67 falling transient edges. The first candidate frequency had 720sampling clock signals per line period, another candidate frequencyvaried between 1072 to 1086, or about 3/2*720. Because the variation wastoo large, these last candidates were already eliminated from furtherexamination. Due to these small variations, the value for the candidatefrequency, 720 sampling clock periods per line period in the aboveexample, must be optimised. Each candidate frequency f_(i) (e.g. 720 and1080) is optimised separately, by setting the frequency pre-scalercircuit 22 and varying the counter value in the sample counter circuit23. If the candidate frequency is higher than 60 MHz, the frequencypre-scaler circuit is set with the divider value of 1. If f_(i) iswithin 30 MHz, 60 MHz!, the divider value is set to 2, within 15 MHz, 30MHz! value 4, and within 7.5 MHz, 15 MHz! the pre-scaler value 8 isinstalled. The candidate counter value N_(i) is computed from the knownHSYNC frequency f_(H) and the candidate pixel frequency f_(i) : N_(i)=f_(i) /f_(H). An improved counter value N'_(i) is derived from thecandidate counter value N_(i) as follows. For a number of neighbouringcounter values N_(i) +j, with j positive and negative integer values, afitness score S_(j) is computed. For this purpose, the counter valueN_(i) +j is installed in the sample counter circuit 23. Also a firstphase shift value is installed in the programmable delay circuit 27. Oneor several video lines containing the largest amount of fast transientsis digitized with these settings. From the thus obtained digital imagesignals a first grey score is computed. The grey score is a number thathas a large value if the number of intermediate grey level valuessurpasses the number of low and high grey level values in the digitalimage signals. This grey score GS can preferentially be computed as asum of transformed digital grey level values. The transformed digitalgrey level values get a high value if they correspond with anintermediate grey level, and a low value when they correspond with anextreme high or low grey level. Therefore, the minimum D_(MIN) andmaximum D_(MAX) digital value for the whole digitized image or thedigitized line are searched. Because the image probably containsconsecutive pixels in one video line having the largest signal value andthe same for the lowest signal value, whatever the sampling clock andphase delay settings are, the digitized values D_(MIN) and D_(MAX) arerepresentative for the whole image, whatever the sampling clock andphase delay for digitizing may be. Preferentially, D_(MIN) isincremented by a certain percentage of the D_(MIN), D_(MAX) ! interval,and D_(MAX) is decreased by the same amount, to avoid that pixels, thatdon't reach the maximum or minimum level, even at the optimal phasesetting, get a bad score. This percentage can be for example 12%. Themean value D_(MID) =(D_(MIN) +D_(MAX))/2 is also computed. For digitalimage signals ranging from D_(MIN) to D_(MAX), the levels L from D_(MIN)to D_(MID) are then linearly transformed from 0 to 100, the levels fromD_(MID) to D_(MAX) are linearly transformed from 100 to 0. All digitallevels below D_(MIN) or above D_(MAX) are transformed to 0. The greyscore GS can be computed preferentially by using a look up table that isgenerated to transform the digital image signals according to the abovedescribed rules. The look up table transforms all digital values nothigher than D_(MIN) to 0, all to 0, a digital lower than D_(MAX) also to0, a digital value (D_(MIN) : +D_(MAX))/2 to 100, and all digital valuesbetween D_(MIN) and D_(MAX) such that two linear functions areestablished. The look up table is constructed such that small deviationsfrom D_(MIN) and D_(MAX), caused by noise, over- and undershoots, arenot as critical as large differences due to sampling in the rising orfalling edges. In the same way as the first phase setting Φ₁ gives afirst grey score GS₁, a second phase setting Φ₂ gives a second greyscore GS₂ etc. About twenty phase settings are equally distributed overthe sampling period, being the reciprocal of the sampling frequency. Thelargest GS_(MAX) and smallest GS_(MIN) grey score GS found for the abouttwenty different phase settings are selected. The fitness score S_(j)for the selected counter value N_(i) +j is computed as the differencebetween the largest and the smallest grey score S_(j) =GS_(MAX-GS)_(MIN) . The counter value N_(i) +k giving the largest fitness scoreS_(k) is selected as the optimal choice for the neighbouring countervalues according to the candidate frequency f_(i). The optimisedfrequency is thus f'_(i) =(N_(i) +k)* f_(H), wherein f_(i). Thehorizontal sync frequency. The ground for this criterium can beexplained by noting that for the correct pixel clock, there is a largedifference between the amount of grey when sampling fast transients withthe correct phase (almost no grey) and the worst phase (grey at eachedge). When fast transients are sampled at the wrong pixel clock, therewill be some grey at each phase setting and the difference between the`best` and the `worst` phase won't be very pronounced. In the example,the scores found for 717 . . . 723 samples per line period arerespectively 4068, 6247, 6741, 24714, 10836, 6432 and 4771. The highestscore of 24714 corresponding with 720 samples per line period isdefinitely the best choice. With a line rate of 15.592 kHz, the samplingfrequency is thus 11.2 MHz. If the counter value range 1072,1086! werehandled, probably 1080 would be found as best counter value.

Once the row of optimised frequencies f'_(i) is established (e.g. 720and 1080 samples), one of these must be established as the most probablepixel frequency. For this purpose, the video lines having the most fasttransients are digitized again, for a first selected optimised frequencyf'₁, and for a fixed amount of different phase settings equallydistributed over the sampling period. For each phase setting Φ_(j), agrey score GS_(j) is computed in the same way as described above. Theminimum grey score GS_(MIN),1 corresponds with the most probable correctphase setting for this optimised frequency f'₁. This value GS_(MIN),1,is divided by the number of samples N'₁ in the current line, which givesthe average amount of grey per sample : GS_(Min1), /N'₁. This procedureis repeated for any other optimised frequency f'_(i), and the frequencyf'_(i) giving the smallest amount of grey per sample GS_(MIN),i /N'_(i)is selected as the optimal choice for the sampling clock frequency. Itis important to compute the amount of grey per sample, because thecandidate frequencies f_(i) are typically quite different, such that thenumber of samples per line and the possible total amount of grey, isquite different for each frequency. The sampling frequency found by thisprocedure is the best match found for the pixel clock frequency, bywhich the analog video signals were generated. Henceforth, this samplingfrequency will be used to sample the analog video signals. Even in thecase where the line period is not an integer multiple of the pixelperiod, but e.g. M=728.333. . . , the method of the current inventionwill find two candidates N₁ =728 and N₂ =729. The first candidate N₁will get the highest score and is actually the best choice that can bemade for sampling the analog video signals.

As said before, the analog video signal reaches its target value in afraction of the pixel clock period after each new pixel value wasoffered to the analog digital convertor in the frame store generatingthe analog video signal. Therefore, it is important to sample the analogvideo signal in the frame grabber at the correct moment during thesampling clock period. This moment or time delay with respect to therising edge of the sampling clock is commonly referenced as the phase.If the phase is set wrongly for the sampling of the analog signal, it ispossible that the analog signal is sampled during its rise time. Fasttransients in the image, caused for example by the presence of sharpedges, white graphics on a black background or vice versa or morespecifically text in the image, will be degraded if they are sampled inthe rise time or on the falling edge. Instead of sampling exclusively ahigh analog level or a low level, intermediate levels will be sampled,giving values in the digitized image that correspond with greyish tonesinstead of contrasting black or white. Preferentially, all samples aretaken with the same phase delay. The programmable circuit 27 shown inFIG. 2 allows a fixed phase shift for all samples. The phase shiftregister can delay the sampling clock signals with a time delay of up to128 nanoseconds, with increments of 0.5 nanoseconds. The optimal phasesetting is found by an iterative procedure. Again, it is necessary thatanalog video signals are transmitted that contain at least one videoline having fast and considerable transients. Preferentially at leastfive lines must contain such transients. This can be either realised bytransmitting analog video signals representing a test image containingon/off patterns, or representing an image containing graphics or text.Preferentially the five video lines having the highest amount oftransients are selected by a procedure as described above. These linesare digitized by the analog video digitizer 33 at a sampling rateimposed by the sampling clock generator 42. The digitized image signalsare stored in the digital memory 35, coupled to the digital output ofthe digitizer 33. From the digital image signals in memory 35, thelowest digital value D_(MIN) and the highest digital value D_(MAX) aredetermined. These values will typically be quite different. If the fasttransients are digitized with a good phase setting in the programmabledelay circuit 27, the digital values D_(MIN) and D_(MAX) will bedominantly present in the digital memory 35. For a bad phase setting,some of the transients will be sampled in the rising or falling edges,between D_(MIN) and D_(MAX), resulting in digital signal values betweenD_(MIN) and D_(MAX).

To select the optimal phase automatically, the selected video lines aredigitized a number of times with different phase settings and, asdescribed above, a grey score GS is computed for each phase setting. Thephase with the lowest grey score GS is selected as the optimal phasesetting.

A first phase setting with a delay of 0 nanoseconds (no phase delay) isinstalled in the programmable delay circuit 27. For the determination ofthe other phase settings, the sampling period, being the reciprocal ofthe sampling frequency, is divided by a factor of 20. This time isrounded up to the next higher half nanosecond and established as thephase increment for the different phase settings Φ_(i), giving each agrey score GS_(i), computed as described above. After the selected videolines have been digitized, each of the digital image signals is passedthrough the look up table defining the grey score for individual digitalsignals and the output values are summed. This sum, for a specific phaseΦ_(i), is the grey score GS_(i). This grey score indicates the amount ofgrey transients that have been digitized. For each phase setting Φ_(i),the corresponding grey score GS is stored.

In theory, the best phase Φ_(i) is the one with the lowest grey scoreGS_(MIN) . In reality however, there is some jitter on the horizontalsync signals, such that a phase setting is only correct within a fewnanoseconds. Taking the lowest grey score GS_(MIN), could result inselecting a first phase setting Φ₁ which differs only a few nanosecondsfrom a second phase setting Φ₂ having a large grey score GS₂, such thata small jitter on the horizontal sync signals will result in a very badimage. To solve this problem, the grey scores of neighbouring phasesettings are also considered. For each phase setting, the phase score,being a weighted sum of grey scores is computed. To compute the phasescore for phase setting Φ_(x), the weight for a grey score GS_(i)obtained from a phase setting Φ_(i) decreases with the absolute phasedifference ΔΦ={Φ_(x) -Φ_(i) }. A preferred weight function is given byw_(i) =2.sup. ΔΦ!, where ΔΦ is expressed in nanoseconds and x! means thehighest integer value not higher than x. The weight is thus 1 for aphase difference between 0 and 1 nanosecond, 1/2 between 1 and 2nanoseconds etc. For a phase difference larger than 7 nanoseconds, thegrey scores can be neglected. These weights make sure that a high greyscore which is only a few nanoseconds from the phase Φ_(x), contributesmore to the phase score than phases further away from phase Φ_(x). Whenthe fast transients are steep and many successive phase settings have agood grey score, phases that are closest to the center of the stretch ofgood grey scores get the lowest phase scores.

For each phase setting Φ_(x), the phase score is computed as describedabove and stored. Once the phase scores for all phase settings areevaluated, the lowest phase score is selected and the correspondingphase setting is considered as the optimal phase. This optimal phasesetting is installed in the programmable delay circuit 27. For theexample described above, for 20 different phase settings, equallydistributed over a sampling period of 90 nanoseconds, a grey score iscomputed. For each new computation, the sampling delay or phase isincremented with 4.5 nanoseconds, corresponding with a digital value of9. The following scores are found : 18, 9, 2, 0, 0, 0, 0, 0, 0, 0, 6,18, 28, 54, 76, 100, 91, 78, 39, 23. The phase setting correspondingwith the fourth zero is selected, which corresponds to 6*4.5=27nanoseconds. The optimal phase setting for sampling the analog videosignals in the current example is thus 27 nanoseconds.

As described above, the analog video signals are sampled at each risingedge of the sampling clock signal. The analog signals are not sampledhowever as long as they are outside the active line time. The start ofthe active line time is always a fixed time after the falling edge ofthe HSYNC signal. Because the time interval between two consecutivesampling clock signals is constant, the sampling can be started a fixednumber of sampling clock cycles after the falling edge of the horizontalsync signal. For this purpose, a counter within the active windowdelineation circuit 44 is restarted by a signal generated by the fallingedge of the horizontal sync signal. The counter counts the rising edgesof the sampling clock signal. As soon as a fixed number of rising edgeswere detected by the counter, the counter enables the sampling clocksignal towards the analog video digitizer circuit 33, that digitizes thefirst signal within the active video line. If a rising edge of thesampling clock signal is very close to the falling edge of thehorizontal sync signal, then it is possible that the counter startseither just before or just after said rising edge of the sampling clocksignal. In the left part of FIG. 5, the counter is reset just before therising edge 91 of the sampling clock signal, and this rising edge isgiven sample number 1. If the active line time starts at sample number4, then the first low level value 92 is sampled. At the right hand sideof FIG. 5, the bold line indicating the SYNC signal has the samelocation relative to the sampling clock signals. However, due to smallvariations in signal shape of the horizontal sync signal, a small timedelay Δt on this signal or an accumulated slight variation of thesampling clock period, it is possible that the falling edge of the HSYNCsignal is detected at the dotted line 93, just later than thetheoretical position. The counter is reset accordingly just after therising edge 94 of the sampling clock signal, and the counter startscounting at the next rising edge of the sampling clock signal. It isclear that the fourth pixel, where the active line video is supposed tostart, is located one sampling clock period too late. This effect can beseen also from another standpoint. All the sampling clock signals,occurring before the falling edge of the HSYNC signals, will generatedigital pixel values belonging to video line N, while all the samplingclock signals occurring after the falling edge of the HSYNC signal, willgenerate digital pixel values belonging to video line N+1=11. If thefalling edge of the HSYNC signal is close to the rising edge of asampling clock signal, line N contains M=10 or M+1=11 pixels, dependenton small time variations--often called jitter--on the falling edge ofthe HSYNC signal. If line N and line N+1 are displayed on a videomonitor or imaged on a hard copy, the pixel shift will be clearlyvisible. In consecutive lines, this effect can become very apparent,when the counter reset signal sometimes occurs just before and sometimesjust after the rising edge of the sampling clock signal. Vertical linesand text will show up very jagged in such image. To solve this problem,a HREF adjust circuit 45 is installed, to create a delayed horizontalsync signal 95. The delayed sync signal triggers the counter, such thatthe falling edge 96 of the delayed HSYNC signal is kept sufficiently faraway (98) from the rising edge 97 of the sampling clock signals. In FIG.5, the same signals are shown, from which it is clear that evenconsiderable variations 88, 89 on the relative location of the fallingedge of the horizontal sync signal with respect to the rising edge ofthe sampling clock signal, does not influence the numbering of thesampling clock signals by the counter. The previous paragraphs describedthat also the relative position or phase of the sampling clock signalswith respect to the falling edge of the horizontal sync signals could bevaried by the programmable delay circuit 27. That means that in FIG. 5,the sampling clock signals can shift towards the right, and thesituation sketched in conjunction with FIG. 5 is again possible.Therefore, in a preferred embodiment of the invention, the HREF phaseshift register can introduce a variable HREF phase shift, preferentiallyfrom 7 to 14 nanoseconds, with an accuracy of 1 nanosecond. This HREFphase shift must now be set such that the above described problem cannot occur. The position of the falling edge of the HSYNC signalsrelative to the position of the rising edge of the sampling clocksignals is influenced by several parameters, such as the samplingfrequency, the pre-scaler setting, etc. such that this relative positionis hardly to compute theoretically. Therefore, it is better to establishan optimal setting for the HREF delay by experiment. Once the samplingfrequency and the phase setting are optimally installed, an analog videosignal--preferentially containing fast transients--is digitized with allpossible settings of the HREF phase shift. For a first setting of theHREF phase shift, the analog video signal is digitized twice or moretimes, and the digital images obtained this way are compared againsteach other. Every digitized video line from the first image is comparedagainst the corresponding video line from the second image and--ifapplicable--to the other digitized images. They are also comparedagainst the corresponding digitized video line, shifted over one pixel.If at least some of the corresponding lines with pixel shift matchbetter than the non-shifted match, the HREF phase shift setting gets alow score. The highest score is reached if all lines of the second andsubsequent images match the corresponding non-shifted lines of the firstimage. For each possible HREF phase setting, a score is computed, andthe maximum score, or alternatively the score most distant from theminimum score is determined. The corresponding phase setting isinstalled in the HREF phase shift register.

Alternatively, the analog video signals, comprising a substantial amountof fast transients, are digitized a first time with the lowest HREFphase setting to give a first digital image, and the same analog videosignals are digitized a second time with the highest HREF phase settingto give a second digital image. The corresponding image lines from thefirst and the second digital image are individually compared againsteach other a first time without a pixel shift and a second time with apixel shift. If the match in the first comparison is less correct thanthe match in the second comparison for some video lines, it is nearlysure that for an intermediate setting of the HREF phase, the risingedges of the sampling clock signal nearly coincide with the fallingedges of the HREF signal. To find this critical HREF phase setting, thesame analog video signals are digitized a third time, and a match issought between the first and the second image. If the third imagematches most to the second image, then the critical HREF phase settingis further sought between the first and third HREF phase shift setting.As soon as the most critical HREF phase setting is located, the HREFphase setting is installed that has the biggest time difference with thecritical HREF phase setting. One must also take into account the factthat the critical HREF phase setting is repeated by the sample period,being the reciprocal of the sampling clock frequency.

A third method to determine experimentally the optimal HREF phasesetting is to fix it at a certain setting HREF₁, vary the delay settingin the programmable delay circuit 27 and digitize analog video signalscontaining fast transients, until the critical phase shift setting Φ₁ isfound that corresponds to the fixed HREF phase setting HREF₁. To assesswhether a delay setting is critical, the digital values of one videoline containing the largest number of transients within the image anddigitized with a previous phase setting is compared against the digitalvalues of the same video line, digitized with the current phase setting.Preferentially, the sampling period is divided in about twenty equalsmall periods. If such small periods are smaller than the resolution ofthe phase delay circuit, then the small period is taken equal to thatresolution. A first phase shift of 0 nanoseconds is installed and theanalog video signals of one video line, containing a large amount oftransients, are digitized to a first digital line DL₁ with the optimalsampling clock period found by the above procedures. Then a phase delayequal to the above mentioned small period is installed, and the samevideo line is digitized once to a second digital line DL₂. The digitalvalues of line DL₁ and DL₂ are compared against each other by making afirst sum SUM₁ over all corresponding pixels of the digital valuedifference between DL₁ and DL₂. A second sum SUM₂ is computed by addingthe absolute values of the difference between pixel 1 of line DL₁ andpixel 2 of line DL₂, pixel 2 of line DL₁ and pixel 3 of line DL₂ etc. IfSUM₁ is smaller than SUM₂, no pixel shift has occurred. In the othercase, a pixel shift has occurred, and the current phase is flagged ascritical with respect to the fixed HREF₁ phase setting. A third phasedelay is installed and the same video line is sampled in DL₃, the sumcomputed with respect to the samples in DL₂, giving new values SUM₁ andSUM₂. Both sums can be considerably large due to a current phase settingthat samples the analog video signals within consecutive pixeltransitions. Therefore, a second fixed HREF₂ phase setting is alsoinstalled, as will be described below.

For HREF₁ =7 nanoseconds, we find for the above described video format acritical phase setting of 51.5 nanoseconds. In order to estimate theaccuracy of the phase correspondence, a second setting HREF₂ is fixed,preferentially most different from the first HREF phase setting HREF₁and again the critical phase shift setting Φ₂, corresponding to the HREFphase setting HREF₂ is found. For the same video format, we found forHREF₂ =14 nanoseconds, a critical phase setting of Φ₂ =60.5 nanoseconds.Because HREF₂ -HREF₁ =7 nanoseconds and Φ₂ -Φ₁ =9 nanoseconds, themeasurements are estimated to be correct. Because the optimal phasesetting for sampling the analog video signals is 27 nanoseconds, andHREF₂ gives the most distant critical phase setting Φ₂ =60.5nanoseconds, the HREF phase setting is set to the value HREF₂.

After the sampling clock and sample delay are optimally set, the activewindow of the analog video signals and the optimal gain and offsetsettings are determined again and more accurately, in the same way asbefore. The number of samples preceding the active window are nowexpressed in relation to the optimal sampling clock period. The widestimage with minimum and maximum brightness areas must be transmitted. Theblack borders around the image--i.e. analog video signals that are closeto the video set-up level--will delineate the portions that will be cutoff from every subsequent image to be sampled. The first digitization isdone with video gain level 0, which corresponds with a 0.3 V gainfactor, and video setup level 0. In the current example, the maximumdigital value within the digital image is found to be 100. Based uponthis maximum, a new gain level is computed to reach a maximum level ofabout 214. With a multiplier in the video gain circuit 30 supplied with0.3 V for digital gain factor 0, and with 1.3 V for digital gain factor255, the gain factor must thus be 0.3 V* 214/100=0.642 V, whichcorresponds with a video gain level of (0.642-0.30)*255=87. The videogain level of 87 and video offset of 0 are set, the analog signals aredigitized and a new maximum digital value of 218 is found. Again thefirst video line having at least three pixels with a digital valuelarger than 218/3=72 or one third of the maximum digital value in theimage is found. The same is done for the bottom video lines. As such 29lines on top and 29 lines at the bottom are estimated to fall withoutthe active window. Over these lines within the active window, the mostleft and most right pixel are found having a digital value larger than72. This time 146 pixels at the left side and 51 pixels at the rightside are found to be outside the active window. These values areconsiderably lower than the values of 232 and 84 found before, mainlybecause the number of samples per horizontal line period is now 720,whereas it was about 1100 before.

The values found for the active window are installed in the activewindow delineation circuit 44, and the digital values acquired arerestricted now to the samples within the active window. The analog videosignals are digitized again with the video gain factor 87 and videooffset setting of 0. The maximum digital value is now 217. A new gainfactor is computed to reach a maximum digital value of 255. Knowing thatgain level 0 results in a maximum digital value 100, and gain level 87results in a maximum digital value 217, we find by simple linearextrapolation that gain level 117 should result in a maximum digitalvalue 255. This video gain level of 117 together with an offset level of0 are set, and the analog video signals are digitized again, giving anoverall minimum digital value of 0 and maximum digital value of 255.

In interlaced video formats, the start of the active horizontal linetime gives a first pixel to be captured, the end of this horizontallinetime gives a last pixel to be captured, which is the same for bothframes. The vertical active frame gives a first line to be captured anda last line to be captured. These line numbers can be different for thefirst and second field of an interlaced image. Counters in the activewindow delineation circuit 44 are installed accordingly, in order todigitize only the analog video signals within the active window. Once anoptimal setting for one or more of the above described parameters, thatcan be electronically set in the video frame grabber according to thecurrent invention, is found, this setting can be directly incorporatedin the circuit and analog video signals representing an image can bedigitized and the corresponding digital image signals stored in thedigital memory for further processing. Alternatively, these parametersettings can be digitally stored in a non-volatile memory means andretrieved each time one or a series of images represented by analogvideo signals must be acquired by the video frame grabber.

Although the present invention has been described with reference topreferred embodiments, those skilled in the art will recognise thatchanges may be made in form and detail without departing from the spiritand scope of the invention.

We claim:
 1. A video frame grabber system for obtaining digital imagesignals from video signals comprising pure analog video signals andsynchronization signals, comprising:an analog video digitizer means fordigitizing said pure analog video signals into said digital imagesignals; a sync signals digitizer means for digitizing saidsynchronization signals into digital synchronization signals; a digitalmemory means for storage of said digital image signals or said digitalsynchronization signals; and a memory selection means for selectivelystoring in said digital memory means either:said digital image signalsor said digital synchronization signals.
 2. The system according toclaim 1, wherein said analog video digitizer means and said sync signalsdigitizer means are incorporated in one analog to digital convertermeans.
 3. The system according to claim 1, further comprising means toextract said synchronization signals from said video signals.
 4. A videoframe grabber system for obtaining digital image signals from videosignals comprising pure analog video signals and synchronizationsignals, comprising:an analog video digitizer means for digitizing saidpure analog video signals into said digital image signals; and a syncsignals digitizer means for digitizing said synchronization signals intodigital synchronization signals; wherein said video signals furthercomprise other pure analog video signals different from said pure analogvideo signals and forming composite video signals together with saidsynchronization signals, and wherein said system further comprises meansto extract said synchronization signals from said composite videosignals.
 5. The system according to claim 1, wherein saidsynchronization signals are composite synchronization signals, andwherein said system further comprises means to extract synchronizationcomponent signals from said composite synchronization signals.
 6. Thesystem according to claim 5, wherein said synchronization componentsignals are horizontal synchronization signals and verticalsynchronization signals.
 7. The system according to claim 1, furthercomprising a sampling clock generator, generating sampling clock signalsfor said analog video digitizer means.
 8. A video frame grabber systemfor obtaining digital image signal from video signals comprising pureanalog video signals and synchronization signals, comprising:an analogvideo digitizer means for digitizing said pure analog video signal intosaid digital image signals; a sampling clock generator, generatingsampling clock signals for said analog video digitizer means; and a baseclock means, generating base clock signals for said sampling clockgenerator.
 9. The system according to claims 8, wherein said base clockmeans comprises a fixed base clock means and a base clock selectionmeans to select said base clock signals for said sampling clockgenerator extracted either from:said synchronization signals or saidfixed base clock means.
 10. The system according to claim 8,wherein:said sampling clock signal have a sampling clock signalsfrequency; said base clock signals have a base clock signals frequency;and said sampling clock generator comprises a sample counter means foradjusting the sampling clock signals frequency with respect to the baseclock signals frequency.
 11. The system according to claim 1, furthercomprising a sampling clock generator, generating sampling clock signalsfor said sync signals digitizer means.
 12. A video frame grabber systemfor obtaining digital image signals from video signals comprising pureanalog video signals and synchronization signals, comprising:an analogvideo digitizer means for digitizing said pure analog video signals intosaid digital image signals; a sync signals digitizer means fordigitizing said synchronization signals into digital synchronizationsignals; a sampling clock generation, generating sampling clock signalsfor said sync signals digitizer means; and a fixed base clock means,generating base clock signals for said sampling clock generator.
 13. Thesystem according to claim 12, further comprising a base clock selectionmeans to select said base clock signals for said sampling clockgenerator extracted either from:said synchronization signals or saidfixed base clock means.
 14. The system according to claim 12,wherein:said signals clock signals have a sampling clock signalsfrequency; said base clock signals have a base clock sign frequency; andsaid sampling clock generator comprises a sample counter means foradjusting the sampling clock signals frequency with respect to the baseclock signals frequency.
 15. A video frame grabber system for obtainingdigital image signal from video signals comprising pure analog videosignals and synchronization signals, comprising:an analog videodigitizer means digitizing said pure video signals into said digitalimage signals; sync gain means for amplification or reduction of theamplitude of said synchronization signals; and a sync signals digitizermeans for digitizing said amplified or amplitude-reduced synchronizationsignals into digital synchronizaton signals.
 16. The system according toclaim 15, wherein the amplification or reduction factor of said syncgain means is variable.
 17. The system according to claim 16, whereinsaid amplification and reduction factor can be set electronically.
 18. Avideo frame grabber system for obtaining digital image signals fromvideo signals comprising pure analog video signal and synchronizationsignals, comprising:an analog video digitizer means for digitizing saidpure analog video signals and said digital image signals; sync thresholdmeans for discrimination between high level and low levelsynchronization signals by a sync threshold level; and a sync signalsdigitizer means for digitizing said threshold-discriminatedsynchronization signals into digital synchronization signals.
 19. Thesystem according to claim 18, wherein said sync threshold level isvariable.
 20. The system according to claim 19, wherein said syncthreshold level can be set electronically.
 21. A video frame grabbersystem for obtaining digital image signals from video signals comprisingpure analog video signals and synchronization signals, comprising:ananalog video digitizer means for digitizing said pure analog videosignal into said digital image signals; a video window delineation meansoperative on said analog video digitizer means for limiting thedigitization of said pure analog video signals to a rectangular window;and a sync signals digitizer means for digitizing said synchronizatonsignals into digital synchronization signals.
 22. The system accordingto claim 21, wherein the position and size of said window is variable.23. The system according to claim 22, wherein said position and size canbe set electronically.
 24. The system according to claim 21, furthercomprising a synchronisation delay means, coupled to said windowdelineation means, for delaying said synchronisation signals by apredetermined time delay.
 25. The system according to claim 24, whereinsaid time delay is variable.
 26. The system according to claim 25,wherein said time delay can be set electronically.
 27. The systemaccording to claim 8, further comprising delay means for delaying saidbase clock signals by a predetermined time delay.
 28. The systemaccording to claim to 27, wherein said time delay is variable.
 29. Thesystem according to claim 28, wherein said time delay can be setelectronically.
 30. A video frame grabber system for obtaining digitalimage signals from video signals comprising pure analog video signalsand synchronization signals, comprising:an analog video digitizer meansfor digitizing said pure analog video signals into said digital imagesignals; an analog signal filter means for filtering saidsynchronization signals; said a sync signals digitizer means fordigitizing said filtered synchronization signals into digitalsynchronization signals.
 31. The system according to claim 30, whereinsaid analog signal filter means is an electronic low pass filter. 32.The system according to claim 31, wherein the cut-off frequency of saidanalog signal filter means can be set electronically.
 33. A video framegrabber systems for obtaining digital image signals from video signalscomprising pure analog video signals and synchronization signals,comprising:an analog video digitizer means for filtering said videosignals; an analog signal digitizer means for digitizing said filteredpure analog video signals into said digital image signals; and a syncsignals digitizer means for digitizing said filtered synchronizationsignals into digital synchronization signals.
 34. The system accordingto claim 33, wherein said analog signal filter means is an electroniclow pass filter.
 35. The system according to claim 34, wherein thecut-off frequency of said analog signal filter means can be setelectronically.
 36. The system according to claim 1, further comprisingvideo gain means for amplification or reduction of the amplitude of saidvideo signals.
 37. The according to claim 36, wherein the amplificationor reduction factor of said video gain means is variable.
 38. The systemaccording to claim 37, wherein said amplification and reduction factorcan be set electronically.
 39. A video frame grabber system forobtaining digital image signals from video signals comprising pureanalog video signals and synchronization signals, comprising:videooffset means for adding or subtracting a predetermined offset level tosaid pure analog video signals; an analog video digitizer means fordigitizing said offset pure analog video signals into said digital imagesignals; and a sync signals digitizer means for digitizing saidsynchronization signals into digital synchronization signals.
 40. Thesystem according to claim 39, wherein said offset level is variable. 41.The system according to claim 40, wherein said offset level can be setelectronically.